借助vant实现列表分页加载和下拉刷新 |
您所在的位置:网站首页 › vant 页面滑动 › 借助vant实现列表分页加载和下拉刷新 |
【源码阅读】—— vue 工具函数
zxb89757: cached方法没考虑到多参数的情况,这里可以改进一下。 function cached(fn) { const cache = Object.create(null) return (function cachedFn (...str) { const hit = cache[str] console.log(cache, str); return hit || (cache[str] = fn(...str)) }) } /** * Camelize a hyphen-delimited string. */ const camelize = cached((str1, str2) => { return str1 + str2 }) camelize('slotScope', '1') camelize('slotScope', '1') 计算机网络 应用层(HTTP)彼 方: 好文,已收藏,大佬有兴趣也可以看下我的博客,说不定也会有所有收获哦~ 计算机网络 应用层(HTTP)看,月亮在跳舞: 博主写的好好,一起加油吖 计算机网络 应用层(HTTP)大家一起学编程(python): 好文章,我来占楼了 计算机网络 应用层(HTTP)看,月亮在跳舞: 优秀优秀,必须给个大大的赞! |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |